<!-- build:css /statics/front/pkg/css/product.css -->
<link href="/statics/front/widgets/jquery.mCustomScrollbar/jquery.mCustomScrollbar.min.css" rel="stylesheet">
<link href="/statics/front/css/product.css" rel="stylesheet">
<?php if($mobile==1){?>
<link href="/statics/front/css/product-mobile.css" rel="stylesheet">
<?php } ?>
<!-- endbuild -->

<?php if($mobile!=1){?>
<div class="clearfix auto mt1x mb2x align-center filter js-filter" data-category="<?php echo $cat_ids; ?>" data-is-new="<?php echo $is_new; ?>">
  <dl class="js-color">
    <dt data-attr="0" class="js-clear-filter">全部颜色</dt>
    <?php foreach ($category_procolor as $v):?>
    <dd data-attr="<?php echo $v['id']; ?>">
      <i style="background-image:url(<?php echo $v['img']; ?>);" data-selected-url="<?php echo $v['adv_img']; ?>"></i>
      <em><?php echo $v['name']; ?><span class="caret-up"></span></em>
    </dd>
    <?php endforeach;?>
  </dl>
  <dl class="js-pattern">
    <dt data-attr="0" class="js-clear-filter">全部图案</dt>
    <?php foreach ($category_color as $v):?>
    <dd data-attr="<?php echo $v['id']; ?>">
      <i style="background-image:url(<?php echo $v['img']; ?>);" data-selected-url="<?php echo $v['adv_img']; ?>"></i>
      <em><?php echo $v['name']; ?><span class="caret-up"></span></em>
    </dd>
    <?php endforeach;?>
  </dl>
  <dl class="price-filter js-price">
    <dt>价格</dt>
    <dd data-attr="1">
      <label>
        <input type="radio" name="radio">
        <span>低到高</span>
      </label>
    </dd>
    <dd data-attr="2">
      <label>
        <input type="radio" name="radio">
        <span>高到低</span>
      </label>
    </dd>
  </dl>
</div>
<?php } else { ?>
<dl class="clearfix mb2x align-center filter js-filter" data-category="<?php echo $cat_ids; ?>" data-is-new="<?php echo $is_new; ?>">
  <dt class="clearfix">
    <span class="current">全部颜色</span>
    <span>全部图案</span>
    <span>价格</span>
  </dt>
  <dd class="visible js-color">
    <?php foreach ($category_procolor as $v):?>
    <p data-attr="<?php echo $v['id']; ?>">
      <i style="background-image:url(<?php echo $v['img']; ?>);" data-selected-url="<?php echo $v['adv_img']; ?>"></i>
      <em><?php echo $v['name']; ?><span class="caret-up"></span></em>
    </p>
    <?php endforeach;?>
  </dd>
  <dd class="js-pattern">
    <?php foreach ($category_color as $v):?>
    <p data-attr="<?php echo $v['id']; ?>">
      <i style="background-image:url(<?php echo $v['img']; ?>);" data-selected-url="<?php echo $v['adv_img']; ?>"></i>
      <em><?php echo $v['name']; ?><span class="caret-up"></span></em>
    </p>
    <?php endforeach;?>
  </dd>
  <dd class="price-filter js-price">
    <p data-attr="1">
      <i class="asc"></i>
      <em>低到高</em>
    </p>
    <p data-attr="2">
      <i class="desc"></i>
      <em>高到低</em>
    </p>
  </dd>
</dl>
<?php } ?>

<?php if($mobile!=1){?>
<div class="clearfix dressing-room-wrapper js-dressing-room-wrapper">
  <div class="toggle-room js-toggle-room">
    <span>试衣间</span>
    <a href="javascript:;"></a>
  </div>
  <i class="close js-close">×</i>
  <div class="clearfix rel pt2x pb2x align-center dressing-room js-dressing-room">
    <div class="mb2x align-left headline">
      <strong class="normal vm">OWNONLY</strong>
      <span class="separator"></span>
      <em class="normal vm">试衣间</em>
    </div>
    <div class="pull-left thumbnails-box">
      <ul class="dib js-thumbnails"></ul>
    </div>
    <div class="rel pull-right costume-matching-box">
      <div class="actions">
        <span class="btn action mr1x js-clear-all">脱</span>
        <span class="btn action js-resize" data-categories="<?php foreach($parent_category as $k=>$v) { ?><?php echo $v['id']; ?>:<?php echo $v['name']; ?>;<?php } ?>" data-text="小窗口">全屏</span>
      </div>
      <div class="mb2x costume-matching">
        <div class="rel auto costume-matching-show js-costume-matching-show"></div>
        <span class="controller arrow-left js-next"></span>
        <span class="controller arrow-right js-prev"></span>
      </div>
      <p class="mb2x amount">搭配总金额：<span class="js-amount">￥1080</span></p>
      <button type="button" class="btn btn-o mr1x js-add-cart">加入购物车</button>
      <a href="<?php echo url('cart/info');?>" class="btn js-buy">立即购买</a>
    </div>
  </div>
</div>
<?php } else { ?>
  <?php if(intval($_REQUEST['cids'])){ ?>
  <a href="/product/product_mobile/src/<?php echo base64_encode("/category/".$_REQUEST['cids']."-");?>" class="to-dressing-room js-to-dressing-room">3D试衣间</a>
  <?php } else if (intval($_REQUEST['cid'])){ ?>
  <a href="/product/product_mobile/src/<?php echo base64_encode("/new/".$_REQUEST['cid']."-");?>" class="to-dressing-room js-to-dressing-room">3D试衣间</a>
  <?php } else { ?>
  <a href="<?php echo url('/product/product_mobile', array('src' =>$_GET['src']));?>" class="to-dressing-room js-to-dressing-room">3D试衣间</a>
  <?php } ?>
<?php } ?>

<?php
  if(isset($productList) && $productList){
?>
<div class="product-list js-product-list">
  <ul class="clearfix">
    <?php
      foreach ($productList as $key => $product){
    ?>
    <li data-goods-id="<?php echo $product['id'];?>">
      <a href="<?php echo $product['url'];?>"<?php if($target == '_blank'):?> target="_blank"<?php endif;?><?php if($product['3d_show2']){?> class="js-try-on"<?php }?>>
        <?php
          $advanced_price = $product['advanced_price'];
          $original_price = $product['original_price'];
          $discounts = round((($original_price - $advanced_price)/$original_price) *100);
        ?>
        <?php
        if($product['original_price']!=0){
          $discountimg=$product['goods_img'] ? $product['goods_img'] : $product['list_img'];
          $discount="<img data-original='".$discountimg."' alt='".$product['name']."'>";
          if(!empty($product['ml_img'])) $discount.="<img data-original='".$product['ml_img']."' class='hide'>";
          $discount.="<span class='mark off'><em>-$discounts%</em></span>";
          echo $discount;
        }elseif($product['hot'] == 1){
          $img=$product['goods_img'] ? $product['goods_img'] : $product['list_img'];
          $hot="<img data-original='".$img."' alt='".$product['name']."'>";
          if(!empty($product['ml_img'])) $hot.="<img data-original='".$product['ml_img']."' class='hide'>";
          $hot.="<span class='mark hot'><em>".L('_hot_')."</em></span>";
          echo $hot;
        }elseif($product['new_product'] == 1){
          $newimg=$product['goods_img'] ? $product['goods_img'] : $product['list_img'];
          $new="<img data-original='".$newimg."' alt='".$product['name']."'>";
          if(!empty($product['ml_img'])) $new.="<img data-original='".$product['ml_img']."' class='hide'>";
          $new.="<span class='mark new'><em>".L('_new_1')."</em></span>";
          echo $new;
        }else{
          $list=$product['goods_img'] ? $product['goods_img'] : $product['list_img'];
          $str="<img data-original='".$list."' alt='".$product['name']."'>";
          if(!empty($product['ml_img'])) $str.="<img data-original='".$product['ml_img']."' class='hide'>";
          echo $str;
        }
        ?>
        <?php if($product['3d_show2']){?>
        <span class="btn try-on">点击试穿</span>
        <?php }?>
      </a>
      <a href="<?php echo $product['url'];?>"<?php if($target == '_blank'):?> target="_blank"<?php endif;?> class="view-details">查看详情</a>
      <strong>
        <a href="<?php echo $product['url'];?>"<?php if($target == '_blank'):?> target="_blank"<?php endif;?>><?php echo $product['name']; ?></a>
      </strong>
      <!-- 三件套特殊处理 同时要显示两件套价格 -->
      <p><!-- 三件套原价 -->
        <?php
          if($original_price > 0){
          $three_price = currency($product['original_price']);
          $three_result="<del>$three_price</del>";
          echo $three_result;
        }
          if($product['attribute_type']==2){
            if($product['product_type']){
              echo currency($product['sell_price']);
            }else{
              echo currency($product['advanced_price']);
            }
            }elseif($product['attribute_type']==1){
              echo currency($product['custom_price']);
            }
        ?>
      </p>
    </li>
    <?php if($fabricinfo){?>
    <?php if((in_array($cat_ids,array(2062,2104,2103,2102))) && $key == 8){?>
    <li>
      <a href="/Customization/fabrics_kit" rel="nofollow">
        <img data-original="<?php echo $fabricinfo['goods_img'] ? $fabricinfo['goods_img'] : $fabricinfo['list_img'];?>" alt="<?php echo $fabricinfo['name'];?>">
      </a>
      <a href="/Customization/fabrics_kit" rel="nofollow" class="view-details">查看详情</a>
      <strong>
        <a href="/Customization/fabrics_kit" rel="nofollow"><?php echo $fabricinfo['name']; ?></a>
      </strong>
      <p class="align-center"><?php echo currency($fabricinfo['advanced_price'])?></p>
    </li>
    <?php }
      if(($cat_ids == 2061 || $cat_ids == 2093  ) && $key == 7){
    ?>
    <li>
      <a href="/Customization/fabrics_kit" rel="nofollow">
        <img data-original="<?php echo $fabricinfo['goods_img'] ? $fabricinfo['goods_img'] : $fabricinfo['list_img'];?>" alt="<?php echo $fabricinfo['name'];?>">
      </a>
      <a href="/Customization/fabrics_kit" rel="nofollow" class="view-details">查看详情</a>
      <strong>
        <a href="/Customization/fabrics_kit" rel="nofollow"><?php echo $fabricinfo['name']; ?></a>
      </strong>
      <p class="align-center"><?php echo currency($fabricinfo['advanced_price']); ?></p>
    </li>
    <?php
        }
      }
    ?>
    <?php } ?>
  </ul>
</div>
<?php
  }else{
?>
<p class="no-record"><?php echo L('noproduct'); ?></p>
<?php
  };
?>

<div class="modal fade js-shoes-size">
  <div class="modal-dialog shoes-size-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
      </div>
      <div class="modal-body">
        <strong class="db mb1x align-center title">皮鞋尺码</strong>
        <form class="auto">
          <div class="mb3x shoe-size">
            <strong class="db mb1x black normal"><?php echo L('_measurement_');?></strong>
            <ul class="ml1x">
              <li class="mb2x">
                <em class="dib mr1x vm normal">鞋长</em>
                <span class="dib vm">
                  <input type="text" name="foot_length"> cm
                </span>
              </li>
              <li class="mb2x">
                <em class="dib mr1x vm normal">鞋宽</em>
                <span class="dib vm">
                  <input type="text" name="foot_width"> cm
                </span>
              </li>
            </ul>
          </div>
          <strong class="black normal"><?php echo L('STANDARD_SIZE');?></strong>
          <p class="mb1x ml1x">我们会根据您平时的穿着的尺码和您的测量尺寸,为您定制合适的鞋子。若有其他特殊要求，也可在结算页面给我们留言。</p>
          <div class="rel mb3x ml1x shoe-size">
            <em class="dib mr1x vm normal">尺码</em>
            <div class="select-widget js-select-widget">
              <i></i>
              <span><?php echo L('please_select'); ?></span>
              <select name="size" title="请选择尺码">
                <option value="" selected><?php echo L('please_select'); ?></option>
              </select>
            </div>
          </div>
          <div>
            <em class="dib mr2x" style="width:32px;"></em>
            <button type="button" class="width-full btn js-submit"><?php echo L('submit'); ?></button>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
<!-- build:js /statics/front/pkg/js/product-list.js -->
<script src="/statics/front/js/plugins/jquery.lazyload.js"></script>
<script src="/statics/front/js/plugins/jquery.powerSwitch.js"></script>
<script src="/statics/front/widgets/jquery.mCustomScrollbar/jquery.mCustomScrollbar.min.js"></script>
<script src="/statics/front/js/plugins/jquery.imgpreload.js"></script>
<script src="/statics/front/js/scripts/product-list/img-lazyload.js"></script>
<script src="/statics/front/js/scripts/product-list/keep-sort.js"></script>
<script src="/statics/front/js/scripts/product-list/filter.js"></script>
<script src="/statics/front/js/scripts/product-list/dressing-room/dressing-room.js"></script>
<script src="/statics/front/js/scripts/product-list/dressing-room/scrollbar.js"></script>
<script src="/statics/front/js/scripts/product-list/dressing-room/layout.js"></script>
<script src="/statics/front/js/scripts/product-list/dressing-room/rotate.js"></script>
<script src="/statics/front/js/scripts/product-list/dressing-room/shoes-size.js"></script>
<script src="/statics/front/js/scripts/product-list/dressing-room/add-goods.js"></script>
<script src="/statics/front/js/scripts/product-list/dressing-room/resize.js"></script>
<!-- endbuild -->